package sdk.org.apache.shiro.G2_使用.C08_会话管理_1会话管理器;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;

import com.titan.core.utils.io.ConsoleUtils;

public class MySessionListener1 implements SessionListener {

    @Override
    public void onStart(Session session) {//会话创建时触发
        ConsoleUtils.method(MySessionListener1.class, "onStart", "会话创建", session.getId());
    }
    @Override
    public void onExpiration(Session session) {//会话过期时触发
        ConsoleUtils.method(MySessionListener1.class, "onExpiration", "会话过期", session.getId());
    }
    @Override
    public void onStop(Session session) {//退出/会话过期时触发
        ConsoleUtils.method(MySessionListener1.class, "onStop", "会话停止", session.getId());
    }

}
